package model;

import java.math.BigDecimal;

import pojo.Product;

public class ProductCartDetail {
	public Product productcart;
	public BigDecimal price;
	public int quantity = 0;
	
	public ProductCartDetail(Product _product, int quan)
	{
		this.productcart = _product;
		this.quantity = quan;
		this.price = this.productcart.getPrice();
	}
	
	public void addQuantity(int num)
	{
		this.quantity += num;
		this.price = this.price.add(this.productcart.getPrice());
	}
}
